//== SAGITTARIUS ============================================================================

//== BEGINNING OF CODE ===============================================================

#ifndef __SAGUTTARUIS__SIZECLASS__H_
#define __SAGUTTARUIS__SIZECLASS__H_

//== INCLUDES ========================================================================

#include "sagittarius/core/SagittariusCore.h"
#include "sagittarius/mem/sysalloc.h"
#include <stddef.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef uint16 sg_sclass;

#define SG_NUM_SIZECLASSES  58
#define SG_MAX_SIZE         SG_PAGE_SIZE

#define SG_GET_SIZECLASS(bytes) get_ksc(bytes)

int n_sizeclasses();

sg_sclass get_ksc(size_t bytes);
size_t sg_sc_nbytes(sg_sclass sc);

#ifdef __cplusplus
}//extern "C"
#endif

#endif
